﻿Public Class ucProduct
    Public Function ValidateProduct() As Boolean
        If txtProductName.Text = "" Or txtQuantity.Text = "" Or txtCPU.Text = "" Or txtHDD.Text = "" Or txtRAM.Text = "" Or txtGraphic.Text = "" Or txtScreen.Text = "" Or txtOtherInfo.Text = "" Or txtRentingPrice.Text = "" Then
            MsgBox("Fields can't be blank!!")
            Return False
        End If
        If txtQuantity.Text Like "[0-9]" And txtQuantity.Text > 0 Then
            MsgBox("Regular!!")
            Return True
        Else
            MsgBox("Don't regular!!")
            txtQuantity.Text = ""
            txtQuantity.Focus()
            Return False
        End If
        If txtRentingPrice.Text Like "[0-9]" Then
            MsgBox("Regular!!")
            Return True
        Else
            MsgBox("Don't regular!!")
            txtRentingPrice.Text = ""
            txtRentingPrice.Focus()
            Return False
        End If
        Return True
    End Function
End Class
